﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_AuctionDetails : System.Web.UI.Page
{
    BusinessLogic obj_businesslogic = new BusinessLogic();
    protected void Page_Load(object sender, EventArgs e)
    {
        DataTable auctiondetails = obj_businesslogic.getAllauctionDetails();
        gvauctions.DataSource = auctiondetails;
        gvauctions.DataBind();

    }

    public string getSRC(object imgSRC)
    {
        DataRowView dRView = (DataRowView)imgSRC;
        string ImageName = dRView["Itemimage"].ToString();
        if (ImageName == "NoImage")
        {
            return ResolveUrl(@"~/itemimages/missing.jpg");
        }
        else
        {
            return ResolveUrl(ImageName);
        }
    }

    public string itemtype(object sURL)
    {
        DataRowView dRView = (DataRowView)sURL;
        string heading = dRView["itemname"].ToString();
        return heading;
    }
}